home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-02 / vdl020d.zip / VEQUIP.DOC < prev    next >
Text File  |  1993-04-14  |  9KB  |  497 lines

  1. {
  2.  ════════════════════════════════════════════════════════════════════════════
  3.  
  4.  Visionix Equipment Determination Unit (VEQUIP)
  5.  Copyright 1991,92,93 Visionix
  6.  ALL RIGHTS RESERVED
  7.  
  8.  ────────────────────────────────────────────────────────────────────────────
  9.  
  10.  Revision history in reverse chronological order:
  11.  
  12.  Initials  Date      Comment
  13.  ────────  ────────  ────────────────────────────────────────────────────────
  14.  
  15.  lpg       03/15/93  Added Source Decumentation
  16.  
  17.  mep       02/11/93  Cleaned up code for beta release
  18.  
  19.  jrt       02/08/93  Sync with beta 0.12 release
  20.  
  21.  jrt       12/15/92  Updated to work in protected mode for BP 7.0
  22.  
  23.  jrt       12/07/92  Sync with beta 0.11 release
  24.  
  25.  lpg       11/30/92  Added New functions & Merged Beta 008 - 009
  26.  
  27.  jrt       11/25/92  brought GetConsoleInfo over from VCRT
  28.                      added Primary/AlternateConsoleIsColor functions
  29.  
  30.  lpg       11/24/92  Slightly modified (ASM)
  31.  
  32.  jrt       11/21/92  Sync with beta 0.08
  33.  
  34.  jrt       11/18/92  First logged revision.
  35.  
  36.  ────────────────────────────────────────────────────────────────────────────
  37.  
  38.  Notes:
  39.  
  40.    add funcs to report what I/O port serial ports are at
  41.    add funcs to report what i/o port par    ports are at
  42.  
  43.    check for presence of weitek coprocessor
  44.  
  45.    load SI with 0 before all INT $11 calls
  46.  
  47.  ════════════════════════════════════════════════════════════════════════════
  48. }
  49.  
  50. Unit VEquip;
  51.  
  52.  
  53. Uses
  54.  
  55.   DOS;
  56.  
  57. {────────────────────────────────────────────────────────────────────────────}
  58.  
  59. Const
  60.  
  61.   cCardNone      = $00;
  62.   cCardVGA       = $01;
  63.   cCardEGA       = $02;
  64.   cCardMDA       = $03;
  65.   cCardHGC       = $04;
  66.   cCardCGA       = $05;
  67.  
  68.   cMonitorNone       = $00;
  69.   cMonitorMono       = $01;
  70.   cMonitorColor      = $02;
  71.   cMonitorEGAHiRes   = $03;
  72.   cMonitorAnaMono    = $04;
  73.   cMonitorAnaColor   = $05;
  74.  
  75. Type
  76.  
  77.   TConsole = RECORD
  78.  
  79.     DisplayCard   : WORD;
  80.     Monitor       : WORD;
  81.  
  82.   END;
  83.  
  84.   PConsole = ^TConsole;
  85.  
  86.   {----}
  87.  
  88.   TConsoleInfo = RECORD
  89.  
  90.     Primary       : TConsole;
  91.     Alternate     : TConsole;
  92.  
  93.   END;
  94.  
  95.   PConsoleInfo = ^TConsoleInfo;
  96.  
  97. {────────────────────────────────────────────────────────────────────────────}
  98.  
  99.   Function  BIOSName                                           : BYTE;
  100.  
  101.   Function  BIOSDate                                           : STRING;
  102.  
  103.   Function  FloppyInstalled                                    : BOOLEAN;
  104.  
  105.   Function  MathChipExist                                      : BOOLEAN;
  106.  
  107.   Function  PointingDeviceExists                               : BOOLEAN;
  108.  
  109.   Procedure GetConsoleInfo(             CI        : PConsoleInfo );
  110.  
  111.   Function  PrimaryDisplayCard                                 : WORD;
  112.  
  113.   Function  AlternateDisplayCard                               : WORD;
  114.  
  115.   Function  NumFloppies                                        : INTEGER;
  116.  
  117.   Function  NumRS232Cards                                      : INTEGER;
  118.  
  119.   Function  GamePortExists                                     : BOOLEAN;
  120.  
  121.   Function  SerialPrinterExists                                : BOOLEAN;  {PCJr Only}
  122.  
  123.   Function  InternalModemExists                                : BOOLEAN;  {Non-PCjr}
  124.  
  125.   Function  NumPrinters                                        : INTEGER;
  126.  
  127.  
  128. {────────────────────────────────────────────────────────────────────────────}
  129.  
  130.  
  131.  
  132. ──────────────────────────────────────────────────────────────────────────────
  133.  
  134.  
  135. [FUNCTION]
  136.  
  137. Function BiosName                                            : BYTE;
  138.  
  139. [PARAMETERS]
  140.  
  141. (None)
  142.  
  143. [RETURNS]
  144.  
  145. The BIOS Name ID Byte
  146.  
  147. [DESCRIPTION]
  148.  
  149. Reads and Returns the System BIOS Name ID Byte.  These are as follows:
  150.   ...
  151.   ...
  152.   ...
  153.   ...
  154.  
  155. { gets the name of the motherboard bios }
  156.  
  157.  
  158. [SEE-ALSO]
  159.  
  160. [EXAMPLE]
  161.  
  162.  
  163. ──────────────────────────────────────────────────────────────────────────────
  164.  
  165.  
  166. [FUNCTION]
  167.  
  168. Function BIOSDate                                            : STRING;
  169.  
  170. [PARAMETERS]
  171.  
  172. (None)
  173.  
  174. [RETURNS]
  175.  
  176. The BIOS Date String
  177.  
  178. [DESCRIPTION]
  179.  
  180. Reads and Returns the BIOS Date String
  181.  
  182.   { gets the date of the motherboard bios }
  183.  
  184. [SEE-ALSO]
  185.  
  186. [EXAMPLE]
  187.  
  188.  
  189. ──────────────────────────────────────────────────────────────────────────────
  190.  
  191.  
  192. [FUNCTION]
  193.  
  194. Function FloppyInstalled                                     : BOOLEAN;
  195.  
  196. [PARAMETERS]
  197.  
  198. (None)
  199.  
  200. [RETURNS]
  201.  
  202. Whether a Floppy Drive is Installed. (TRUE=Yes)
  203.  
  204. [DESCRIPTION]
  205.  
  206. Tests and Returns whether even a single Floppy Drive is Installed in
  207. the system.
  208.  
  209.   { returns TRUE if floppy drive is installed }
  210.  
  211. [SEE-ALSO]
  212.  
  213. [EXAMPLE]
  214.  
  215.  
  216. ──────────────────────────────────────────────────────────────────────────────
  217.  
  218.  
  219. [FUNCTION]
  220.  
  221. Function MathChipExist                                       : BOOLEAN;
  222.  
  223. [PARAMETERS]
  224.  
  225. (None)
  226.  
  227. [RETURNS]
  228.  
  229. Whether a Math Co-Processor Chip is Installed (TRUE=Yes)
  230.  
  231. [DESCRIPTION]
  232.  
  233. Tests and Returns whether a Math CoProcessor Chip is installed in the
  234. system.
  235.  
  236.   { returns TRUE if Math Co-Processor exists }
  237.  
  238. [SEE-ALSO]
  239.  
  240. [EXAMPLE]
  241.  
  242.  
  243. ──────────────────────────────────────────────────────────────────────────────
  244.  
  245.  
  246. [FUNCTION]
  247.  
  248. Function PointingDeviceExists                                : BOOLEAN;
  249.  
  250. [PARAMETERS]
  251.  
  252. (None)
  253.  
  254. [RETURNS]
  255.  
  256. Whether a Pointing Device Exists (TRUE=Yes)
  257.  
  258. [DESCRIPTION]
  259.  
  260. Tests and Returns whether any type of Pointing Device is attached to
  261. the system.  This includes a Mouse, Light Pen, etc.
  262.  
  263.   { returns TRUE if a pointing device is present }
  264.  
  265. [SEE-ALSO]
  266.  
  267. [EXAMPLE]
  268.  
  269.  
  270. ──────────────────────────────────────────────────────────────────────────────
  271.  
  272.  
  273. [FUNCTION]
  274.  
  275. Procedure GetConsoleInfo(              CI        : PConsoleInfo );
  276.  
  277. [PARAMETERS]
  278.  
  279. CI          Pointer to Returned Console Information Structure
  280.  
  281. [RETURNS]
  282.  
  283. Function : None
  284. (Ptr     : [CI] Pointer to Returned Console Information Structure)
  285.  
  286. [DESCRIPTION]
  287.  
  288.   { gets info on primary and alternate display consoles }
  289.  
  290. [SEE-ALSO]
  291.  
  292. [EXAMPLE]
  293.  
  294.  
  295. ──────────────────────────────────────────────────────────────────────────────
  296.  
  297.  
  298. [FUNCTION]
  299.  
  300. Function PrimaryDisplayCard                                  : WORD;
  301.  
  302. [PARAMETERS]
  303.  
  304. (None)
  305.  
  306. [RETURNS]
  307.  
  308. [DESCRIPTION]
  309.  
  310.   { returns the primary display card type (vga/ega/mda/hgc/cga) }
  311.  
  312. [SEE-ALSO]
  313.  
  314. [EXAMPLE]
  315.  
  316.  
  317. ──────────────────────────────────────────────────────────────────────────────
  318.  
  319.  
  320. [FUNCTION]
  321.  
  322. Function AlternateDisplayCard                                : WORD;
  323.  
  324. [PARAMETERS]
  325.  
  326. (None)
  327.  
  328. [RETURNS]
  329.  
  330. [DESCRIPTION]
  331.  
  332.   { returns the alternate display card type (vga/ega/mda/hgc/cga) }
  333.  
  334. [SEE-ALSO]
  335.  
  336. [EXAMPLE]
  337.  
  338.  
  339. ──────────────────────────────────────────────────────────────────────────────
  340.  
  341.  
  342. [FUNCTION]
  343.  
  344. Function NumFloppies                                         : INTEGER;
  345.  
  346. [PARAMETERS]
  347.  
  348. (None)
  349.  
  350. [RETURNS]
  351.  
  352. The Number of Floppy Drives Attached
  353.  
  354. [DESCRIPTION]
  355.  
  356. Tests and Returns the Number of Floppy Drives Attached to the System.
  357.  
  358.   { returns the number of installed floppies }
  359.  
  360. [SEE-ALSO]
  361.  
  362. [EXAMPLE]
  363.  
  364.  
  365. ──────────────────────────────────────────────────────────────────────────────
  366.  
  367.  
  368. [FUNCTION]
  369.  
  370. Function NumRS232Cards                                       : INTEGER;
  371.  
  372. [PARAMETERS]
  373.  
  374. (None)
  375.  
  376. [RETURNS]
  377.  
  378. The Number of RS-232 Cards Attached
  379.  
  380. [DESCRIPTION]
  381.  
  382. Attempts to Detect the Number of RS-232 Cards that are attached to the
  383. system.
  384.  
  385.   { returns the number of RS-232 ports }
  386.  
  387. [SEE-ALSO]
  388.  
  389. [EXAMPLE]
  390.  
  391.  
  392. ──────────────────────────────────────────────────────────────────────────────
  393.  
  394.  
  395. [FUNCTION]
  396.  
  397. Function GamePortExists                                      : BOOLEAN;
  398.  
  399. [PARAMETERS]
  400.  
  401. (None)
  402.  
  403. [RETURNS]
  404.  
  405. Whether a Game Port Exits (TRUE=Yes)
  406.  
  407. [DESCRIPTION]
  408.  
  409. Tests and Returns whether a Game Port Exists.
  410.  
  411.   { returns TRUE if a joystick port exists }
  412.  
  413. [SEE-ALSO]
  414.  
  415. [EXAMPLE]
  416.  
  417.  
  418. ──────────────────────────────────────────────────────────────────────────────
  419.  
  420.  
  421. [FUNCTION]
  422.  
  423. Function SerialPrinterExists                                 : BOOLEAN;
  424.  
  425. [PARAMETERS]
  426.  
  427. (None)
  428.  
  429. [RETURNS]
  430.  
  431. Whether a Serial Printer Exists (TRUE=Yes)
  432.  
  433. [DESCRIPTION]
  434.  
  435. Attempts to Detect and Report whether a Serial Printer is attached to the
  436. System and Active (ie. Turned On).
  437.  
  438. Test Valid for PCJr Systems Only.
  439.  
  440. [SEE-ALSO]
  441.  
  442. [EXAMPLE]
  443.  
  444.  
  445. ──────────────────────────────────────────────────────────────────────────────
  446.  
  447.  
  448. [FUNCTION]
  449.  
  450. Function InternalModemExists                                 : BOOLEAN;
  451.  
  452. [PARAMETERS]
  453.  
  454. (None)
  455.  
  456. [RETURNS]
  457.  
  458. Whether an Internal Modem Exists (TRUE=Yes)
  459.  
  460. [DESCRIPTION]
  461.  
  462. Tests and Returns whether an Internal Modem Exists.
  463.  
  464. Test Valid only for Non-PCjr Systems.
  465.  
  466. [SEE-ALSO]
  467.  
  468. [EXAMPLE]
  469.  
  470.  
  471. ──────────────────────────────────────────────────────────────────────────────
  472.  
  473.  
  474. [FUNCTION]
  475.  
  476. Function NumPrinters                                         : INTEGER;
  477.  
  478. [PARAMETERS]
  479.  
  480. (None)
  481.  
  482. [RETURNS]
  483.  
  484. Number of Printers Attached
  485.  
  486. [DESCRIPTION]
  487.  
  488. Attempts to Detect and Report the Number of Printers Attached to the
  489. System and Active (ie. Turned On).
  490.  
  491.   { returns number of LPT ports }
  492.  
  493. [SEE-ALSO]
  494.  
  495. [EXAMPLE]
  496.  
  497.